export * from './workflow-template';

export interface TemplateListItem {
    id: string;
    name: string;
    description: string;
    thumbnail: string;
    author: string;
    tags: string[];
    category: string;
    stats: {
        uses: number;
        likes: number;
        views: number;
    };
    updateTime: Date;
}

export interface PaginatedResponse<T> {
    items: T[];
    pagination: {
        total: number;
        page: number;
        pageSize: number;
        pages: number;
    };
}

export interface ParamNode {
    id: string;
    nodeId: string;
    inputId: string;
    type: 'text' | 'number' | 'select' | 'boolean' | 'slider' | 'color';
    label?: string;
    placeholder?: string;
    defaultValue?: any;
    min?: number;
    max?: number;
    step?: number;
    options?: Array<{
        label: string;
        value: any;
    }>;
    help?: string;
    activeText?: string;
    inactiveText?: string;
    showAlpha?: boolean;
    configurable?: boolean;
    value?: any;
}

export interface WorkflowTemplate {
    id?: string;
    name: string;
    description: string;
    category: string;
    tags: string[];
    thumbnail: string;
    comfyuiJson: any;
    isPublic: boolean;
    version: string;
    rows: number;
    params: ParamNode[];
    stats: {
        uses: number;
        likes: number;
        views: number;
    };
    createTime?: string;
    createdAt?: string;
    updateTime?: string;
    updatedAt?: string;
}

export interface WorkflowParam {
    label: string;
    type: string;
    nodeId: string;
    defaultValue?: any;
    config?: any;
    required?: boolean;
    order?: number | string;
}